use std::fmt;

fn main() {
    let debug = format!("{:?}", format_args!("{} foo {:?}", 1, 2));
    let display = format!("{}", format_args!("{} foo {:?}", 1, 2));
    assert_eq!("1 foo 2", display);
    assert_eq!(display, debug);

    println!("debug:{}\n display:{}",debug,display);

    let s = fmt::format(format_args!("hello {}", "world"));
    assert_eq!(s, format!("hello {}", "world"));

    println!("s:{}\n",s);
}
